using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using System.Configuration;


namespace AlumnosWS
{
    class bdService
    {
        private String dbNom() {
            string connStr = ConfigurationManager.ConnectionStrings["avaluacionsConnectionString"].ConnectionString;
            return connStr;
        }
        public DataTable Notes(int IdAlumne)
        {
            OleDbDataAdapter adapta=new OleDbDataAdapter("SELECT * FROM notes where id_alumne="+IdAlumne.ToString()  ,dbNom()) ;
            DataTable alumnes = new DataTable("Notes");
            adapta.Fill(alumnes);
            return alumnes;
        }
        public DataTable Alumnes()
        {
            OleDbDataAdapter adapta = new OleDbDataAdapter("SELECT * FROM VistaAlumnesAsignatura order by id_asignatura", dbNom());
            DataTable alumnes = new DataTable("Alumnes");
            adapta.Fill(alumnes);
            return alumnes;
        }
 

    }
}
